package com.itHsuSE.demo2;

public class Work1 {
    public static void main(String[] args) {
        double[] arr = {1.2, 3.3, 5.4};
        A01 a01 = new A01();
        System.out.println(a01.max(arr));
    }
}

class A01 {
    public Double max(double[] arr) {
        if (arr != null && arr.length > 0) {
            return null;
        }
        double maxArr = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > maxArr) {
                maxArr = arr[i];
            }
        }
        return maxArr;
    }
}
